package com.xm_jd.model.dao;

import java.util.List;

import com.xm_jd.model.entitys.GoodsDetailVO;
import com.xm_jd.model.entitys.leibie;
import com.xm_jd.utils.BaseDao;

public class SyDao {
	BaseDao<GoodsDetailVO> dao = new BaseDao<>(GoodsDetailVO.class);
	BaseDao<leibie> bdap = new BaseDao<>(leibie.class);
	 
	public List<GoodsDetailVO> getseleclt(){
		String sql = "SELECT * FROM tb_shoop INNER JOIN tb_picture ON tb_shoop.shoop_Id=tb_picture.picture_shoop_Id WHERE shoop_News='1' AND tb_picture.picture_Zcg=1 LIMIT 8;";
		return dao.selectAll(sql, null);
	}
	
	public List<GoodsDetailVO> getselecltxp(){
		String sql = "SELECT * FROM tb_shoop INNER JOIN tb_picture ON tb_shoop.shoop_Id=tb_picture.picture_shoop_Id WHERE shoop_HotSell='1' AND tb_picture.picture_Zcg=1 LIMIT 8;";
		return dao.selectAll(sql, null);
	}
	
	
	public List<leibie> getselectdt1(){
		String sql = "SELECT * FROM tb_leibie WHERE tb_leibie.leibie_id='2';";
		return bdap.selectAll(sql, null);
	}
	
	public List<leibie> getselectdd1(){
		String sql = "SELECT * FROM tb_leibie WHERE tb_leibie.leibie_fujiid='2' limit 4";
		return bdap.selectAll(sql, null);
	}
	
	
	
	public List<leibie> getselectdt2(){
		String sql = "SELECT * FROM tb_leibie WHERE tb_leibie.leibie_id='3';";
		return bdap.selectAll(sql, null);
	}
	
	public List<leibie> getselectdd2(){
		String sql = "SELECT * FROM tb_leibie WHERE tb_leibie.leibie_fujiid='3' limit 6";
		return bdap.selectAll(sql, null);
	}
	
	
	public List<leibie> getselectdt3(){
		String sql = "SELECT * FROM tb_leibie WHERE tb_leibie.leibie_id='4';";
		return bdap.selectAll(sql, null);
	}
	
	public List<leibie> getselectdd3(){
		String sql = "SELECT * FROM tb_leibie WHERE tb_leibie.leibie_fujiid='4' limit 6";
		return bdap.selectAll(sql, null);
	}
	
	public List<leibie> getselectdt4(){
		String sql = "SELECT * FROM tb_leibie WHERE tb_leibie.leibie_id='5';";
		return bdap.selectAll(sql, null);
	}
	
	public List<leibie> getselectdd4(){
		String sql = "SELECT * FROM tb_leibie WHERE tb_leibie.leibie_fujiid='5' limit 4";
		return bdap.selectAll(sql, null);
	}
}
